home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gas_251.zip / bin_251 / binutils / testsuite / Makefile.in < prev   
Makefile  |  1994-10-13  |  5KB  |  184 lines

  1. # Makefile for regression testing the GNU binary utilities.
  2. # Copyright (C) 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program; if not, write to the Free Software
  14. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. srcdir = .
  17. prefix = /usr/local
  18.  
  19. program_transform_name = 
  20. exec_prefix = $(prefix)
  21. bindir = $(exec_prefix)/bin
  22. libdir = $(exec_prefix)/lib
  23. tooldir = $(libdir)/$(target_alias)
  24.  
  25. datadir = $(exec_prefix)/lib/deja-gnu
  26. mandir = $(prefix)/man
  27. man1dir = $(mandir)/man1
  28. man2dir = $(mandir)/man2
  29. man3dir = $(mandir)/man3
  30. man4dir = $(mandir)/man4
  31. man5dir = $(mandir)/man5
  32. man6dir = $(mandir)/man6
  33. man7dir = $(mandir)/man7
  34. man8dir = $(mandir)/man8
  35. man9dir = $(mandir)/man9
  36. infodir = $(prefix)/info
  37. includedir = $(prefix)/include
  38. gxx_includedir = $(tooldir)/g++-include
  39. docdir = $(datadir)/doc
  40. targetdir = $(datadir)/$(target_alias)
  41.  
  42. SHELL = /bin/sh
  43.  
  44. INSTALL = install -c
  45. INSTALL_PROGRAM = $(INSTALL)
  46. INSTALL_DATA = $(INSTALL)
  47.  
  48.  
  49. CC_FOR_TARGET = ` \
  50.   if [ -f $${rootme}/../../gcc/xgcc ] ; then \
  51.     echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
  52.   else \
  53.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  54.       echo $(CC); \
  55.     else \
  56.       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
  57.     fi; \
  58.   fi`
  59.  
  60. CXX = gcc
  61. CXX_FOR_TARGET = ` \
  62.   if [ -f $${rootme}/../../gcc/xgcc ] ; then \
  63.     echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
  64.   else \
  65.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  66.       echo $(CXX); \
  67.     else \
  68.       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
  69.     fi; \
  70.   fi`
  71.  
  72. CXXFLAGS = -g -O
  73.  
  74. EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; \
  75.         then echo $${rootme}/../../expect/expect ; \
  76.         else echo expect; fi`
  77.  
  78. LINK=        ln -s
  79. SUBDIRS=
  80.  
  81. RUNTEST = `if [ -f ${srcdir}/../../dejagnu/runtest ] ; \
  82.            then echo ${srcdir}/../../dejagnu/runtest ; \
  83.            else echo runtest ;  fi`
  84. RUNTESTFLAGS = 
  85. FLAGS_TO_PASS = \
  86.     "CC=$(CC)" \
  87.     "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  88.     "CFLAGS=$(CFLAGS)"
  89.  
  90. #### host, target, and site specific Makefile frags come in here.
  91.  
  92. all:        subdirs
  93.  
  94. .NOEXPORT:
  95. INFODIRS=doc
  96. info:
  97.     @rootme=`pwd`/ ; export rootme ; \
  98.     rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
  99.     $(MAKE) subdir_do DO=info "DODIRS=$(INFODIRS)" $(FLAGS_TO_PASS)
  100.  
  101. install-info:
  102.     @rootme=`pwd`/ ; export rootme ; \
  103.     $(MAKE) subdir_do DO=install-info "DODIRS=$(INFODIRS)" $(FLAGS_TO_PASS)
  104.  
  105. check: site.exp all
  106.     rootme=`pwd`; export rootme; \
  107.     srcdir=${srcdir} ; export srcdir ; \
  108.     EXPECT=${EXPECT} ; export EXPECT ; \
  109.     if [ -f $${rootme}/../../expect/expect ] ; then  \
  110.        TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
  111.        export TCL_LIBRARY ; fi ; \
  112.     $(RUNTEST) $(RUNTESTFLAGS)
  113.  
  114. site.exp: ./config.status Makefile
  115.     @echo "Making a new config file..."
  116.     -@rm -f ./tmp?
  117.     @touch site.exp
  118.     -@mv site.exp site.bak
  119.     @echo "## these variables are automatically generated by make ##" > ./tmp0
  120.     @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
  121.     @echo "# add them to the last section" >> ./tmp0
  122.     @echo "set host_triplet ${host_canonical}" >> ./tmp0
  123.     @echo "set target_triplet ${target_canonical}" >> ./tmp0
  124.     @echo "set tool binutils" >> ./tmp0
  125.     @echo "set srcdir ${srcdir}" >> ./tmp0
  126.     @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
  127.         @cat ./tmp0 > site.exp
  128.     @cat site.bak | sed \
  129.             -e '1,/^## All variables above are.*##/ d' >> site.exp
  130.     -@rm -f ./tmp?
  131.  
  132. install:
  133. uninstall: force
  134.  
  135. subdir_do: force
  136.     @for i in $(DODIRS); do \
  137.         if [ -d ./$$i ] ; then \
  138.             if (rootme=`pwd`/ ; export rootme ; \
  139.                 rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
  140.                 cd ./$$i; \
  141.                 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
  142.             else exit 1 ; fi ; \
  143.         else true ; fi ; \
  144.     done
  145. force:
  146.  
  147.  
  148. subdirs:
  149.     for dir in ${SUBDIRS}; \
  150.     do \
  151.         echo "$$dir:"; \
  152.         if [ -d $$dir ]; then \
  153.             (rootme=`pwd`/ ; export rootme ; \
  154.              rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
  155.              cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
  156.         fi; \
  157.     done
  158.  
  159. clean:
  160.     -rm -f *~ core *.o a.out xgdb *.x
  161.         for dir in ${SUBDIRS}; \
  162.         do \
  163.             echo "$$dir:"; \
  164.             if [ -d $$dir ]; then \
  165.                 (cd $$dir; $(MAKE) clean); \
  166.             fi; \
  167.         done
  168.  
  169. distclean: clean
  170.     -rm -f *~ core
  171.     -rm -f Makefile config.status *-init.exp
  172.     -rm -fr *.log summary detail
  173.         for dir in ${SUBDIRS}; \
  174.         do \
  175.             echo "$$dir:"; \
  176.             (cd $$dir; $(MAKE) distclean); \
  177.         done
  178.  
  179. Makefile : $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  180.     $(SHELL) ./config.status
  181.  
  182.